package com.jprocms.module.cms.dal.dataobject.investigateitemop;

import com.jpro.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jprocms.module.cms.dal.dataobject.investigateopinion.InvestigateOpinionDO;
import lombok.*;

/**
 * 调查问卷条目意见 DO
 *
 * @author jprocms
 */
@TableName("cms_investigate_item_op")
@KeySequence("cms_investigate_item_op_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InvestigateItemOpDO extends BaseDO {

    /**
     * ID
     */
    @TableId
    private Long id;
    /**
     * 问卷选项ID
     */
    private Long investigateItemId;
    /**
     * 问卷意见ID
     */
    private Long investigateOpinionId;
    /**
     * 问卷ID
     */
    private Long investigateId;
    /**
     * 回答
     */
    private String itemAnswer;

    /**
     * 意见ID
     */
    @TableField(exist = false)
    private InvestigateOpinionDO opinion;

    public InvestigateItemOpDO(Long investigateItemId, Long investigateOpinionId, Long investigateId, String itemAnswer) {
        this.investigateItemId = investigateItemId;
        this.investigateOpinionId = investigateOpinionId;
        this.investigateId = investigateId;
        this.itemAnswer = itemAnswer;
    }
}
